<?php
use App\Services\Search\SearchService;
use App\Models\User\UserModel;
use App\Jobs\Fun;
use App\Models\User\UserGongsiModel;
$word='爆爆';
$type='gc';



$jieguolist = [];
        $word = '%' . $word . '%';
        $titlemodel = \App\Models\User\UsergongchangModel::getModel()
            ->whereRaw('legal_name LIKE ? OR com_name LIKE ?', [$word, $word])
            ->where([
                'visible' => 1
            ])->select([
                'id', 'uid', 'legal_name',
                'com_name', 'detail'
            ])
          //  ->orderBy('id', 'desc')
            ->get();
        $titlelist = [];
        if ($titlemodel) {
            $titlelist = $titlemodel->toArray();
        }
        foreach ($titlelist as $vo) {
            $user = UserModel::getinfo($vo['uid']);
            $jieguolist[] = [
                'uid' => $vo['uid'],
                'user_name' => $user['name'],
                'user_head' => $user['head'],
                'com_name' => $vo['com_name'],
                'detail' => Fun::shenglue($vo['detail'], 64),
            ];
        }

    print_r($jieguolist);










/*
$sear = new SearchService();
$list = $sear->getFind($word, $type);
print_r($list);
*/
exit("");



/**

  'uid'=>$vo['uid'],
                'user_name'=>$user['name'],
                'user_head'=>$user['head'],
                'com_name'=>$vo['com_name'],
                'detail'=>Fun::shenglue($vo['detail'],64),
 */

exit;





















/*
   var list=[];
var rawlt=$('.job-list .item');
	for(var i=0;i<rawlt.length;i++){
		let one=$(rawlt[i]);
		let newli={
			href:one.find('a').attr('href'),
			title:one.find('.title-text').text(),
			salary:one.find('.salary').text(),
			msg:[$(one.find('.msg em')[0]).text(),$(one.find('.msg em')[1]).text(),$(one.find('.msg em')[2]).text()],
			name:one.find('.name').text()
		};
		list.push(newli);
	}
console.log(list);


$data=\App\Models\UserQuick::getgongshixinxi(74);
print_r($data);
*/